const Router = require('koa-router')
const {login, wxLogin, logout, getStarNum,getWxUserList} = require('../controller/appletUserController')
const {appletAuth, wxAppletAuth} = require('../middleware/auth.middleware')

const userRouter = new Router({prefix: '/applet/user'})

userRouter.post('/login', login)

userRouter.post('/wxLogin', wxLogin)

userRouter.post('/logout', appletAuth, logout)

userRouter.post('/wxLogout', wxAppletAuth, logout)

userRouter.get('/starNum', appletAuth, getStarNum)

userRouter.get('/list',getWxUserList)

module.exports = userRouter
